﻿#region File Description
// EpicLeadManager
// EpicLeadManager
// Player.cs
#endregion

#region Using References
using System;
using System.Collections.Specialized;
using System.ComponentModel;
using SQLite;

#endregion

namespace EpicLeadManager.Models
{
    #region Profession
    public enum Profession
    {
        MESMER,
        GUARDIAN,
        NECROMANCER,
        RANGER,
        ELEMENTALIST,
        WARRIOR,
        THIEF,
        ENGINEER,
        REVENANT
    }
    #endregion

    public class Player : INotifyPropertyChanged
    {
        #region Fields & Properties
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        [Column("Name")]
        public string Name { get; set; }

        [Column("Profession")]
        public Profession Profession { get; set; }
        #endregion

        #region Constructors
        public Player()
        {

        }

        public Player(string name, Profession profession)
        {
            Name = name;
            Profession = profession;
        }
        #endregion

        #region Public Methods
        public override string ToString()
        {
            return String.Format("Id: {0}, Name: {1}, Profession: {2}", Id, Name, Profession);
        }
        #endregion

        #region INotifyCollectionChanged Members

        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion
    }
}